import App from './App'
import Vue from 'vue'
import VHtmlPlugin from '@megalo/vhtml-plugin'
import Vuex from 'vuex'

Vue.use(VHtmlPlugin)
Vue.use(Vuex)

const store = require('./store').default
Vue.prototype.$store = store

const app = new Vue(App)

app.$mount()

export default {
  config: {
    // pages 的首个页面会被编译成首页
    pages: [
      'pages/home/index',
      'pages/topic/index',
      'pages/topic/list/index',
      'pages/goods/index',
      'pages/goods/checkOut/index',
      'pages/cart/index',
      'pages/my/index'
    ],
    tabBar: {
      borderStyle: 'white',
      backgroundColor: '#252d4a',
      color: '#f8f8f8',
      selectedColor: '#343d5e',
      list: [
        {
          pagePath: 'pages/home/index',
          text: 'Explore',
          iconPath: 'native/tabbar/home.png',
          selectedIconPath: 'native/tabbar/home_on.png'
        },
        {
          pagePath: 'pages/topic/index',
          text: 'Topic',
          iconPath: 'native/tabbar/mine.png',
          selectedIconPath: 'native/tabbar/mine_on.png'
        },
        {
          pagePath: 'pages/cart/index',
          text: 'Basket',
          iconPath: 'native/tabbar/vue.png',
          selectedIconPath: 'native/tabbar/vue_on.png'
        },
        {
          pagePath: 'pages/my/index',
          text: 'Profile',
          iconPath: 'native/tabbar/vue.png',
          selectedIconPath: 'native/tabbar/vue_on.png'
        }
      ]
    },
    window: {
      backgroundTextStyle: 'light',
      navigationBarBackgroundColor: '#252d4a',
      navigationBarTitleText: 'megalo project',
      navigationBarTextStyle: 'white'
    },
    permission: {
      'scope.userLocation': {
        'desc': '你的位置信息将用于小程序位置接口的效果展示'
      }
    },
    usingComponents: {
      'van-action-sheet': 'native/vant-weapp/lib/action-sheet/index',
      'van-area': 'native/vant-weapp/lib/area/index',
      'van-badge': 'native/vant-weapp/lib/badge/index',
      'van-badge-group': 'native/vant-weapp/lib/badge-group/index',
      'van-button': 'native/vant-weapp/lib/button/index',
      'van-card': 'native/vant-weapp/lib/card/index',
      'van-cell': 'native/vant-weapp/lib/cell/index',
      'van-cell-group': 'native/vant-weapp/lib/cell-group/index',
      'van-checkbox': 'native/vant-weapp/lib/checkbox/index',
      'van-checkbox-group': 'native/vant-weapp/lib/checkbox-group/index',
      'van-col': 'native/vant-weapp/lib/col/index',
      'van-dialog': 'native/vant-weapp/lib/dialog/index',
      'van-field': 'native/vant-weapp/lib/field/index',
      'van-goods-action': 'native/vant-weapp/lib/goods-action/index',
      'van-goods-action-icon': 'native/vant-weapp/lib/goods-action-icon/index',
      'van-goods-action-button': 'native/vant-weapp/lib/goods-action-button/index',
      'van-icon': 'native/vant-weapp/lib/icon/index',
      'van-loading': 'native/vant-weapp/lib/loading/index',
      'van-nav-bar': 'native/vant-weapp/lib/nav-bar/index',
      'van-notice-bar': 'native/vant-weapp/lib/notice-bar/index',
      'van-notify': 'native/vant-weapp/lib/notify/index',
      'van-panel': 'native/vant-weapp/lib/panel/index',
      'van-popup': 'native/vant-weapp/lib/popup/index',
      'van-progress': 'native/vant-weapp/lib/progress/index',
      'van-radio': 'native/vant-weapp/lib/radio/index',
      'van-radio-group': 'native/vant-weapp/lib/radio-group/index',
      'van-row': 'native/vant-weapp/lib/row/index',
      'van-search': 'native/vant-weapp/lib/search/index',
      'van-slider': 'native/vant-weapp/lib/slider/index',
      'van-stepper': 'native/vant-weapp/lib/stepper/index',
      'van-steps': 'native/vant-weapp/lib/steps/index',
      'van-submit-bar': 'native/vant-weapp/lib/submit-bar/index',
      'van-swipe-cell': 'native/vant-weapp/lib/swipe-cell/index',
      'van-switch': 'native/vant-weapp/lib/switch/index',
      'van-switch-cell': 'native/vant-weapp/lib/switch-cell/index',
      'van-tab': 'native/vant-weapp/lib/tab/index',
      'van-tabs': 'native/vant-weapp/lib/tabs/index',
      'van-tabbar': 'native/vant-weapp/lib/tabbar/index',
      'van-tabbar-item': 'native/vant-weapp/lib/tabbar-item/index',
      'van-tag': 'native/vant-weapp/lib/tag/index',
      'van-toast': 'native/vant-weapp/lib/toast/index',
      'van-transition': 'native/vant-weapp/lib/transition/index',
      'van-tree-select': 'native/vant-weapp/lib/tree-select/index',
      'van-datetime-picker': 'native/vant-weapp/lib/datetime-picker/index',
      'van-rate': 'native/vant-weapp/lib/rate/index',
      'van-collapse': 'native/vant-weapp/lib/collapse/index',
      'van-collapse-item': 'native/vant-weapp/lib/collapse-item/index',
      'van-picker': 'native/vant-weapp/lib/picker/index'
    }
  }
}
